from io import BytesIO
from camel.loaders import create_file_from_raw_bytes

# 读取pdf文件
with open("123.pdf", "rb") as file:
    file_content = file.read()

# 使用create_file函数根据文件扩展名创建对象
file_obj = create_file_from_raw_bytes(file_content, "123.pdf")

# 获取File对象的内容
print(file_obj.docs[1]["page_content"])
